//
//  AdvisoryContentCell.m
//  WE
//
//  Created by iMacOne on 15/11/19.
//  Copyright © 2015年 UNOHACHA. All rights reserved.
//

#import "AdvisoryContentCell.h"
#import "Head.h"
@interface AdvisoryContentCell ()
@property (nonatomic, strong)UILabel * contentLbl;
@property (nonatomic, strong)UIView * aBackgroundView;
@property (nonatomic, strong)UIImageView * iconImageView;
@property (nonatomic, strong)UILabel * nameLbl;
@property (nonatomic, strong)UILabel * questionLbl;
@property (nonatomic, strong)UILabel * identifierLbl;



@end

@implementation AdvisoryContentCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.contentLbl = [[UILabel alloc] initWithFrame:CGRectMake(margin_10, margin_10, WindowWidth - margin_20, margin_34)];
        _contentLbl.font = FONT(12);
        _contentLbl.numberOfLines = 0;
        _contentLbl.text = @"""医生您好, 我在4个月之前做了肠镜病理检查室慢性肠炎, 当时的症状是流血了...."" ";
        self.aBackgroundView = [[UIView alloc] initWithFrame:CGRectMake(margin_10, CGRectGetMaxY(_contentLbl.frame), WindowWidth- margin_20, margin_64)];
        _aBackgroundView.backgroundColor = [UIColor grayColor];
        
        self.iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(margin_5, margin_5, margin_20, margin_20)];
        _iconImageView.backgroundColor = DEBUG_CLOLR;
        _iconImageView.layer.masksToBounds = YES;
        _iconImageView.layer.cornerRadius = 10;
        
        self.nameLbl = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_iconImageView.frame) + margin_10, _iconImageView.frame.origin.y, margin_48, margin_15)];
        _nameLbl.font = FONT(12);
        _nameLbl.text = @"张大春";
        
        self.identifierLbl = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_nameLbl.frame) + margin_10, _iconImageView.frame.origin.y, [ToolUtil autoWidth:@"张大春杭州市二级甲等医院主任医师" width:0 height:margin_15 num:10], margin_15)];
        _identifierLbl.font = FONT(10);
        
        _identifierLbl.text = @"张大春杭州市二级甲等医院主任医师";
        
        self.questionLbl = [[UILabel alloc] initWithFrame:CGRectMake(_iconImageView.frame.origin.x , CGRectGetMaxY(_iconImageView.frame), _contentLbl.frame.size.width, margin_34)];
        _questionLbl.font = FONT(12);
        _questionLbl.text = @"请把肠镜报告与病理报告发给我吧 现在怎么养了 吃的什么药 好点没有 ";
        _questionLbl.numberOfLines = 0;
        [self.aBackgroundView addSubview:_iconImageView];
        [self.aBackgroundView addSubview:_nameLbl];
        [self.aBackgroundView addSubview:_identifierLbl];
        [self.aBackgroundView addSubview:_questionLbl];
        [self.contentView addSubview:_contentLbl];
        [self.contentView addSubview:_aBackgroundView];
        




        
        
       
        
        
        
        
    }
    return self;
}



@end
